import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SEntityId } from "./SEntityId";
import { DictIntStrHelper } from "./DictIntStrHelper";
import { SPoint } from "./SPoint";
import { DictIntIntHelper } from "./DictIntIntHelper";
import { SFightAttribute } from "./SFightAttribute";
import { SFightAttributeEx } from "./SFightAttributeEx";
import { SWuXinAttribute } from "./SWuXinAttribute";
import { SeqBufferHelper } from "./SeqBufferHelper";
import { SeqSkillHelper } from "./SeqSkillHelper";
import { SeqTrumpEffectHelper } from "./SeqTrumpEffectHelper";
type int = number;
//class SFightRole
    
    export  class SFightRole
    {
       

        public __read(arg1: SerializeStream): void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(arg1);
            this.toEntityId = new SEntityId();
            this.toEntityId.__read(arg1);
            this.gateChannelId = arg1.readInt();
            this.serverId = arg1.readInt();
            this.cellId = arg1.readInt();
            this.playerId = arg1.readInt();
            this.username = arg1.readString();
            this.type = arg1.readInt();
            this.roleId = arg1.readInt();
            this.level = arg1.readInt();
            this.code = arg1.readInt();
            this.name = arg1.readString();
            this.titles = DictIntStrHelper.read(arg1);
            this.camp = arg1.readInt();
            this.growth = arg1.readInt();
            this.avatar = arg1.readInt();
            this.photo = arg1.readInt();
            this.VIP = arg1.readByte();
            this.guildId = arg1.readInt();
            this.guildName = arg1.readString();
            this.guildLevel = arg1.readByte();
            this.guildPosition = arg1.readByte();
            this.action = arg1.readByte();
            this.spaceId = arg1.readInt();
            this.point = new SPoint();
            this.point.__read(arg1);
            this.sex = arg1.readInt();
            this.career = arg1.readInt();
            this.careerEnable = arg1.readInt();
            this.life = arg1.readInt();
            this.mana = arg1.readInt();
            this.weapons = DictIntIntHelper.read(arg1);
            this.baseFight = new SFightAttribute();
            this.baseFight.__read(arg1);
            this.addFight = new SFightAttribute();
            this.addFight.__read(arg1);
            this.fightEx = new SFightAttributeEx();
            this.fightEx.__read(arg1);
            this.wuxin = new SWuXinAttribute();
            this.wuxin.__read(arg1);
            this.buffers = SeqBufferHelper.read(arg1);
            this.skills = SeqSkillHelper.read(arg1);
            this.trumpEffects = SeqTrumpEffectHelper.read(arg1);
            this.attackCd = arg1.readInt();
            this.skillPublicCd = arg1.readInt();
            this.attackCdDt = arg1.readDate();
            this.skillPublicCdDt = arg1.readDate();
            this.fightMode = arg1.readInt();
            this.status = arg1.readInt();
            this.talent = arg1.readInt();
            this.energy = arg1.readInt();
            this.reserve1 = arg1.readInt();
            this.reserve2 = arg1.readInt();
            this.reserve3 = arg1.readInt();
            this.reserve4 = arg1.readInt();
            this.reserveJs = arg1.readString();
            this.createPlayerDt = arg1.readDate();
            this.newEnergy = arg1.readInt();
            this.newEnergyMax = arg1.readInt();
            this.maxCombat = arg1.readInt();
            this.reserve8 = arg1.readInt();
            this.modelId = arg1.readInt();
            this.countryPosition = arg1.readInt();
            return;
        }

        public __write(arg1: SerializeStream): void
        {
            this.entityId.__write(arg1);
            this.toEntityId.__write(arg1);
            arg1.writeInt(this.gateChannelId);
            arg1.writeInt(this.serverId);
            arg1.writeInt(this.cellId);
            arg1.writeInt(this.playerId);
            arg1.writeString(this.username);
            arg1.writeInt(this.type);
            arg1.writeInt(this.roleId);
            arg1.writeInt(this.level);
            arg1.writeInt(this.code);
            arg1.writeString(this.name);
            DictIntStrHelper.write(arg1, this.titles);
            arg1.writeInt(this.camp);
            arg1.writeInt(this.growth);
            arg1.writeInt(this.avatar);
            arg1.writeInt(this.photo);
            arg1.writeByte(this.VIP);
            arg1.writeInt(this.guildId);
            arg1.writeString(this.guildName);
            arg1.writeByte(this.guildLevel);
            arg1.writeByte(this.guildPosition);
            arg1.writeByte(this.action);
            arg1.writeInt(this.spaceId);
            this.point.__write(arg1);
            arg1.writeInt(this.sex);
            arg1.writeInt(this.career);
            arg1.writeInt(this.careerEnable);
            arg1.writeInt(this.life);
            arg1.writeInt(this.mana);
            DictIntIntHelper.write(arg1, this.weapons);
            this.baseFight.__write(arg1);
            this.addFight.__write(arg1);
            this.fightEx.__write(arg1);
            this.wuxin.__write(arg1);
            SeqBufferHelper.write(arg1, this.buffers);
            SeqSkillHelper.write(arg1, this.skills);
            SeqTrumpEffectHelper.write(arg1, this.trumpEffects);
            arg1.writeInt(this.attackCd);
            arg1.writeInt(this.skillPublicCd);
            arg1.writeDate(this.attackCdDt);
            arg1.writeDate(this.skillPublicCdDt);
            arg1.writeInt(this.fightMode);
            arg1.writeInt(this.status);
            arg1.writeInt(this.talent);
            arg1.writeInt(this.energy);
            arg1.writeInt(this.reserve1);
            arg1.writeInt(this.reserve2);
            arg1.writeInt(this.reserve3);
            arg1.writeInt(this.reserve4);
            arg1.writeString(this.reserveJs);
            arg1.writeDate(this.createPlayerDt);
            arg1.writeInt(this.newEnergy);
            arg1.writeInt(this.newEnergyMax);
            arg1.writeInt(this.maxCombat);
            arg1.writeInt(this.reserve8);
            arg1.writeInt(this.modelId);
            arg1.writeInt(this.countryPosition);
            return;
        }

        public /* var */gateChannelId: int;

        public /* var */serverId: int;

        public /* var */cellId: int;

        public /* var */playerId: int;

        public /* var */username: string;

        public /* var */type: int;

        public /* var */roleId: int;

        public /* var */level: int;

        public /* var */code: int;

        public /* var */name: string;

        public /* var */titles: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */camp: int;

        public /* var */growth: int;

        public /* var */avatar: int;

        public /* var */photo: int;

        public /* var */VIP: int;

        public /* var */guildId: int;

        public /* var */guildName: string;

        public /* var */guildLevel: int;

        public /* var */guildPosition: int;

        public /* var */action: int;

        public /* var */spaceId: int;

        public /* var */point: SPoint;

        public /* var */sex: int;

        public /* var */career: int;

        public /* var */careerEnable: int;

        public /* var */life: int;

        public /* var */mana: int;

        public /* var */weapons: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */baseFight: SFightAttribute;

        public /* var */addFight: SFightAttribute;

        public /* var */fightEx: SFightAttributeEx;

        public /* var */wuxin: SWuXinAttribute;

        public /* var */buffers: Array<any>;

        public /* var */skills: Array<any>;

        public /* var */trumpEffects: Array<any>;

        public /* var */attackCd: int;

        public /* var */skillPublicCd: int;

        public /* var */attackCdDt: Date;

        public /* var */skillPublicCdDt: Date;

        public /* var */fightMode: int;

        public /* var */status: int;

        public /* var */talent: int;

        public /* var */entityId: SEntityId;

        public /* var */reserve1: int;

        public /* var */reserve2: int;

        public /* var */reserve3: int;

        public /* var */reserve4: int;

        public /* var */reserveJs: string;

        public /* var */createPlayerDt: Date;

        public /* var */energy: int;

        public /* var */newEnergyMax: int;

        public /* var */maxCombat: int;

        public /* var */reserve8: int;

        public /* var */modelId: int;

        public /* var */countryPosition: int;

        public /* var */toEntityId: SEntityId;

        public /* var */newEnergy: int;
    }
